<template>
  <div class="test-container">
    <RightList :list="lists" @select="handleSelect" />
  </div>
</template>

<script>
import RightList from "./RightList.vue";
export default {
  components: {
    RightList,
  },
  data() {
    return {
      lists: [
        {
          name: "aaa",
          isSelect: false,
          child: [
            { name: "aaa-111", isSelect: false },
            { name: "aaa-222", isSelect: false },
            { name: "aaa-333", isSelect: false },
          ],
        },
        { name: "bbb", isSelect: false },
        { name: "ccc", isSelect: false },
        {
          name: "ddd",
          isSelect: false,
          child: [
            { name: "ddd-111", isSelect: true },
            {
              name: "ddd-222",
              isSelect: false,
              child: [
                { name: "ddd-222-111", isSelect: false },
                { name: "ddd-222-222", isSelect: false },
                { name: "ddd-222-333", isSelect: false },
              ],
            },
            { name: "ddd-333", isSelect: false },
          ],
        },
        { name: "eee", isSelect: false },
      ],
    };
  },
  methods: {
    handleSelect(item) {
      console.log(item);
    }
  }
};
</script>

<style lang="less" scoped>
</style>